// 搜索抽屉
#drawer-search {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: none;


  .drawer-search-content {
    height: 150px;
    padding: 10px;
    display: flex;
    background-color: $white;
    box-shadow: 0 1px 2px 0 $box-shadow;
    transition: opacity .25s, transform .25s;

    //表单
    .search-form {
      margin: auto;
      display: flex;
      width: 100%;
      border: 1px solid $body-bg;
      background-color: $body-bg;
      border-radius: 2px;
      position: relative;

      //选中
      &:focus-within {
        border-color: $primary;

        &+.add-btn {
          width: 0;
          margin-left: 0;
          overflow: hidden;
        }
      }

      .search-input {
        min-width: 0;
        flex-grow: 1;
        border: none;
        box-shadow: none;
        outline: none;
        font-size: 14px;
        color: $text-search;
        background-color: transparent;
        padding: 8px 0 8px 12px;
        height: calc(#{$header-btn-h} - 2px);
        transition: width .3s;
      }

      .search-btn {
        cursor: pointer;
        padding: 0 6px;

        .icon {
          height: 100%;
          display: flex;
          align-items: center;
          font-size: 14px;
          color: $text-search;
        }
      }

      // 搜索记录
      .typehead {
        display: none;
        position: absolute;
        top: 105%;
        left: 0;
        right: 0;
        background-color: $white;
        font-size: 12px;
        line-height: 2;
        color: $typehead-color;
        border: 1px solid $border-color;
        border-radius: 3px;
        box-shadow: 0 1px 2px 0 $box-shadow;
        transition: width .3s;

        &.show {
          display: block;
        }

        .title {
          margin: 3px 12px;
          border-bottom: 1px solid $border-color;
          display: flex;
          justify-content: space-between;

          .clear {
            cursor: pointer;
          }
        }

        .list {
          color: $typehead-list-color;
          padding-bottom: 3px;
          cursor: pointer;

          >div {
            padding: 3px 12px;
            @include nowrap();


            &:hover,
            &:active {
              background-color: darken($white, 5%);
            }
          }
        }
      }
    }
  }
}